﻿using AutoMapper;
using SIG.InputModel.Front.Identity;
using SIG.InputModel.Front.Shipping;
using SIG.Model.Ads;
using SIG.Model.Articles;
using SIG.Model.Identity;
using SIG.Model.Shipping;
using SIG.Model.Store;
using SIG.ViewModel.Front.Articles;
using SIG.ViewModel.Front.Ads;
using SIG.ViewModel.Front.Identity;
using SIG.ViewModel.Front.Menus;
using SIG.ViewModel.Front.Shipping;
using SIG.ViewModel.Front.Store;
using System;
using SIG.Model.Announcements;
using SIG.ViewModel.Front.Announcements;
using SIG.Model.Case;
using SIG.ViewModel.Front.Clients;
using SIG.Model.Videos;
using SIG.ViewModel.Front.Videos;
using SIG.Model.Blogs;
using SIG.ViewModel.Front.Blogs;
using SIG.ViewModel.Front.Works;
using SIG.ViewModel.Front.Solutions;
using SIG.ViewModel.Front.Links;
using SIG.Model;
using SIG.ViewModel.Front.Teams;
using SIG.Model.Teams;
using SIG.ViewModel.Front.Albums;
using SIG.Model.Albums;
using SIG.ViewModel.Front.Products;

namespace SIG.WebMVC.Mappings
{
    public class FrontMappingProfile : Profile
    {
        public FrontMappingProfile()
        {
            CreateMap<Goods, GoodsVM>();
            CreateMap<Goods, GoodsDetailVM>();

            CreateMap<GoodsVM, Goods>();
            CreateMap<GoodsCategory, GoodsCategoryVM>();
            CreateMap<GoodsCategoryVM, GoodsCategory>();

            CreateMap<Carousel, CarouselVM>();
            CreateMap<CarouselVM, Carousel>();

            CreateMap<Article, ArticleVM>();

            CreateMap<Menu, MenuVM>();

            CreateMap<RecipientInfo, RecipientInfoVM>();
            CreateMap<RecipientInfo, RecipientInfoIM>();
            CreateMap<RecipientInfoIM, RecipientInfo>();

            CreateMap<User, UserVM>();
            CreateMap<User, ProfileIM>();
            CreateMap<ProfileIM, User>();

            CreateMap<Announcement, AnnouncementVM>();
            CreateMap<Client, ClientVM>();
            CreateMap<Video, VideoVM>();
            CreateMap<Post, PostVM>();
            CreateMap<SIG.DAL.Dapper.Model.Post, PostDetailVM>();
            CreateMap<Work, WorkVM>();
            CreateMap<Solution, SolutionVM>();

            CreateMap<Link, LinkVM>();
            CreateMap<LinkCategory, LinkCategoryVM>();       
            CreateMap<Photo, PhotoVM>();

            CreateMap<Product, ProductVM>();
            CreateMap<SIG.DAL.Dapper.Model.Product, ProductDetail>();
            CreateMap<Category, CategoryVM>();
        }
        //[Obsolete]
        //protected override void Configure()
        //{
        //    CreateMap<Goods, GoodsVM>();
        //    CreateMap<Goods, GoodsDetailVM>();
            
        //    CreateMap<GoodsVM, Goods>();
        //    CreateMap<GoodsCategory, GoodsCategoryVM>();
        //    CreateMap<GoodsCategoryVM, GoodsCategory>();

        //    CreateMap<Carousel, CarouselVM>();
        //    CreateMap<CarouselVM, Carousel>();

        //    CreateMap<Article, ArticleVM>();
         
        //    CreateMap<Menu, MenuVM>();

        //    CreateMap<RecipientInfo, RecipientInfoVM>();
        //    CreateMap<RecipientInfo, RecipientInfoIM>();
        //    CreateMap<RecipientInfoIM, RecipientInfo>();

        //    CreateMap<User, UserVM>();
        //    CreateMap<User, ProfileIM>();
        //    CreateMap<ProfileIM,User>();

        //    CreateMap<Announcement, AnnouncementVM>();
        //    CreateMap<Client, ClientVM>();
        //    CreateMap<Video, VideoVM>();
        //    CreateMap<Post, PostVM>();
        //    CreateMap<Post, PostDetailVM>();
        //    CreateMap<Work, WorkVM>();
        //    CreateMap<Solution, SolutionVM>();

        //    CreateMap<Link, LinkVM>();
        //    CreateMap<LinkCategory, LinkCategoryVM>();
        //    CreateMap<Team, TeamVM>();
        //    CreateMap<Photo, PhotoVM>();

        //    CreateMap<Product, ProductVM>();
        //    CreateMap<Product, ProductDetail>();
        //    CreateMap<Category, CategoryVM>();
        //}       
        

    }
}